package com.appkubes.mall.restful.application.order.order.service;

import com.appkubes.common.exception.BusinessException;
import com.appkubes.mall.core.entity.MallOrder;
import com.appkubes.mall.core.service.BaseMallOrderService;
import com.appkubes.mall.restful.application.order.order.entity.dto.GetListOrderResult;
import com.appkubes.mall.restful.application.order.order.entity.vo.MallOrderGoodsVo;
import com.appkubes.mall.restful.application.order.order.entity.vo.OrderAddVO;
import com.appkubes.mall.restful.application.order.order.entity.vo.OrderVo;

import java.util.List;

/**
 * @Author: Rongjie
 * @Date: 2020/2/23
 * @Description:
 */
public interface OrderService extends BaseMallOrderService {

    List<GetListOrderResult> getList(String queryStr, int page, int limit);

    List<MallOrderGoodsVo> addOrder(MallOrder order, OrderAddVO orderAddVO) throws BusinessException;

    //只供租赁使用
    void usingOrder(OrderVo orderVo) throws RuntimeException;

    void onPayCallback(String orderKey) throws Exception;

    Boolean applyCancelOrder(String orderKey) throws Exception;

    Boolean cancel(String orderKey) throws Exception;


    List<MallOrder> getUserOrders(String userKey);

    public void onOrderPay(String orderKey);

}
